package com.example.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @author 紫煦桉
 */
public class BooksMessage extends AbstractToString {
    private Integer booksNo;
    private String booksName;
    private BooksRank booksRank;
    private String booksAuthor;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date booksDate;
    private Integer booksTime;
    private AreaMessage areaMessage;

    public BooksMessage() {
    }

    public BooksMessage(Integer booksNo) {
        this.booksNo = booksNo;
    }

    public BooksMessage(Integer booksNo, String booksName, String booksAuthor, Date booksDate, Integer booksTime) {
        this.booksNo = booksNo;
        this.booksName = booksName;
        this.booksAuthor = booksAuthor;
        this.booksDate = booksDate;
        this.booksTime = booksTime;
    }

    public BooksMessage(Integer booksNo, String booksName, BooksRank booksRank, String booksAuthor, Date booksDate, Integer booksTime, AreaMessage areaMessage) {
        this.booksNo = booksNo;
        this.booksName = booksName;
        this.booksRank = booksRank;
        this.booksAuthor = booksAuthor;
        this.booksDate = booksDate;
        this.booksTime = booksTime;
        this.areaMessage = areaMessage;
    }

    public Integer getBooksNo() {
        return booksNo;
    }

    public void setBooksNo(Integer booksNo) {
        this.booksNo = booksNo;
    }

    public String getBooksName() {
        return booksName;
    }

    public void setBooksName(String booksName) {
        this.booksName = booksName;
    }

    public BooksRank getBooksRank() {
        return booksRank;
    }

    public void setBooksRank(BooksRank booksRank) {
        this.booksRank = booksRank;
    }

    public String getBooksAuthor() {
        return booksAuthor;
    }

    public void setBooksAuthor(String booksAuthor) {
        this.booksAuthor = booksAuthor;
    }

    public Date getBooksDate() {
        return booksDate;
    }

    public void setBooksDate(Date booksDate) {
        this.booksDate = booksDate;
    }

    public Integer getBooksTime() {
        return booksTime;
    }

    public void setBooksTime(Integer booksTime) {
        this.booksTime = booksTime;
    }

    public AreaMessage getAreaMessage() {
        return areaMessage;
    }

    public void setAreaMessage(AreaMessage areaMessage) {
        this.areaMessage = areaMessage;
    }
}
